package com.fskury.jksspringbootstarterautoconfigure.configure;

import com.fskury.jksspringbootstarterautoconfigure.properties.JksProperties;
import com.fskury.jksspringbootstarterautoconfigure.service.JksService;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableConfigurationProperties(JksProperties.class)
public class ServiceAutoConfigure {
  private final JksProperties jksProperties;

  public ServiceAutoConfigure(JksProperties jksProperties) {
    this.jksProperties = jksProperties;
  }

  @Bean
  public JksService jksService(){
    return new JksService(jksProperties);
  }
}
